package com.woniu.owner.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniu.common.ResponseData;
import com.woniu.owner.entity.Community;
import com.woniu.owner.service.CommunityService;
import com.woniu.owner.mapper.CommunityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author admin
 * @description 针对表【community(小区信息表)】的数据库操作Service实现
 * @createDate 2025-01-13 09:56:39
 */
@Service
public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, Community>
        implements CommunityService {
    @Override
    public ResponseData<?> getAllCommunityLocations(String telephoneNumber) {
        List<Community> communities = lambdaQuery()
                .eq(Community::getTelephoneNumber, telephoneNumber)
                .list();
        return new ResponseData<>().ok(communities);
    }
}




